From 78b3afe2e5764b3ac61c46042c63619455483999 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 27 Nov 2014 12:34:34 +0000 Subject: [PATCH] python/xs: Correct the indirection of the NULL xshandle() check The code now now matches its comment, and will actually catch the case of a bad xs handle. Signed-off-by: Andrew Cooper Coverity-ID: 1055948 CC: Ian Campbell CC: Ian Jackson CC: Wei Liu CC: Xen Coverity Team Acked-by: Ian Campbell --- tools/python/xen/lowlevel/xs/xs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xs/xs.c b/tools/python/xen/lowlevel/xs/xs.c index 84e1711f60..ec364bb535 100644 --- a/tools/python/xen/lowlevel/xs/xs.c +++ b/tools/python/xen/lowlevel/xs/xs.c @@ -816,7 +816,7 @@ static int parse_transaction_path(XsHandle *self, PyObject *args, *xh = xshandle(self); - if (!xh) + if (!*xh) return 0; if (!PyArg_ParseTuple(args, "ss", &thstr, path)) -- 2.30.2